<template>
  <div class="Frequency">
    <van-cell-group>
      <van-cell title="发作次数"
                :value="newCount?newCount:'暂无记录哟'"/>
      <van-cell title="发作频率"
                value="天"/>

    </van-cell-group>
  </div>
</template>

<script>
import {mapGetters} from "vuex";

export default {
  name: 'Frequency',
  computed: {...mapGetters(['userPhone'])},
  data() {
    return {
      newCount: '',//最新发作次数
    }
  }, mounted() {
    this.getNewCount();
  },
  methods: {
    //  查询最新发作次数
    getNewCount() {
      this.$service.frontPageService.recortCount(this.userPhone).then(res => {
        this.newCount = res.data.data;
        console.log('发作次数=' + this.newCount);
      })
    }
  }
}
</script>

<style scoped lang="less">

</style>
